{% extends "base/common.html" %}
{% load i18n %}

{% block html_title %}
    {% trans "Log In" %}
{% endblock %}

{% block function_on_load %}
    $('#id_username').focus();
{% endblock %}

{% block content %}
    <span class="login" id="container">
        <h1 id="site-name" >{{ settings.CONFERENCE_NAME }} Login</h1>


        {% if form.username.errors or form.password.errors %}
            <div class="errornote">
                {{ form.username.errors }}
                {{ form.password.errors }}
            </div>
        {% else %}
            {{ form.errors }}
        {% endif %}
        <div id="content-main">
            <form action="{% url django.contrib.auth.views.login %}" method="post" id="login-form">
                <div class="form-row">
                    <label for="id_username">
                        {% trans "Username" %}: 
                    </label> 
                    <input tabindex="1" type="text" name="username" id="id_username" />
                    <span class="help">
                        {% trans "Don't have an account?" %}
                        <a tabindex="4" href="/users/create/">
                            {% trans "Create one here" %}.
                        </a>
                    </span>
                </div>
                <div class="form-row">
                    <label for="id_password">
                        {% trans "Password" %}:
                    </label> 
                    <input tabindex="2" type="password" name="password" id="id_password" />
                    <span class="help">
                        {% trans "Have you" %} 
                        <a tabindex="5" href="/users/reset_password/">
                            {% trans "Forgotten your password" %}
                        </a>
                    </span>
                </div>
                <div class="submit-row">
                    <input tabindex="3" type="submit" class="default" value="Log in" />
                </div>
                <input type="hidden" name="next" value="{% url static.views.index %}"/>
            </form>
        </div>
    </span>
{% endblock %}

